package com.better.frontend.controller.report;

import com.better.backend.dataComputingService.model.stuScore.ExamStudentScoreCalModel;
import com.better.frontend.Iservice.scoresegment.SegmentMangerService;
import com.better.frontend.model.scoresegment.ClassSementParm;
import com.better.frontend.model.scoresegment.ScoreSementParm;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

/**
 * 提供excel下载
 */
@Api(value = "下载管理", tags = "下载管理")
@RestController
@RequestMapping("api/download")
public class DownloadExcelController {
  @Resource
  private SegmentMangerService segmentMangerService;
  /**
   *  查看成绩列表导出功能
   * @param scoreModel
   * @return
   */
  @ApiOperation(value = "查看成绩列表导出",notes = "查看成绩列表导出")
  @GetMapping("scoreSegementDownload")
  public void scoreSegementDownload(ExamStudentScoreCalModel scoreModel, HttpServletResponse response){
    segmentMangerService.scoreSegementDownload(scoreModel,response);
  }
  /**
   *  分数段管理导出
   * @param scoreSementParm
   * @return
   */
  @ApiOperation(value = "分数段管理导出",notes = "分数段管理导出")
  @GetMapping("scoreSectionDownload")
  public void scoreSectionDownload(ScoreSementParm scoreSementParm, HttpServletResponse response){
    this.segmentMangerService.scoreSectionDownload(scoreSementParm,response);
  }
  /**
   *  踩线生管理列表导出
   * @param scoreSementParm
   * @return
   */
  @ApiOperation(value = "踩线生管理列表导出",notes = "踩线生管理列表导出")
  @GetMapping("stepLineDownload")
  public void stepLineDownload( ScoreSementParm scoreSementParm,HttpServletResponse response){
    this.segmentMangerService.stepLineDownload(scoreSementParm,response);
  }

  /**
   *  班级分数段列表导出
   * @param classSementParm
   * @param response
   */
  @ApiOperation(value="班级分数段列表导出",notes="班级分数段列表导出" )
  @GetMapping("classSementStudentDownload")
  public void classSementStudentDownload(ClassSementParm classSementParm, HttpServletResponse response){
    this.segmentMangerService.classSementStudentDownload(classSementParm,response);
  }
}
